Railway operation is affected by a range of environmental factors. In Switzerland, these effects are accentuated in autumn, when precipitation increases, temperatures fall and many trees drop their leaves. It is common knowledge that this season is prone to lower punctuality, which is a measure of quality of this mode of transport. This project investigates the influence of one of these variables, precipitation. The script is built to analyse a recent 24h timeframe.
First, daily public transport data is obtained from opentransportdata.swiss (Kundeninformation 2025). The raw data contains one data point for every ride conducted on that day. E.g. The stop of train service R16 in Biel with planned and actual arrival and departure time. Because the dataset also contains non-swiss stops and bus and ferry services, its filtered for to the relevant extent first. Then delay on arrival is calculated from planned vs. actual values. Delays on departure are ignored because it is assumed that they would not be caused by precipitation but rather from human influence. Then the train stations are assigned their geographical coordinates by matching the BPUIC number to a table containing their location (öv-info.ch n.d.). Next, the data is aggregated to show delay rate per stop and per hour. Precipitation data stems from the radar product CombiPrecip (CPC) by the Federal Office of Meteorology and Climatology MeteoSwiss (Meteorology and MeteoSwiss n.d.). Data is provided as .h5 raster files with a time resolution of 10 minutes, containing the precipitation total of the previous 60 minutes. Processing is conducted to match the hourly punctuality data structure. Hourly precipitation total is then extracted at the exact locations of the train stations. Eventually, global and hourly correlation is investigated.
Hourly punctuality usually shows high regional variability. A delay rate of 0 means no trains were delayed during that hour on that stop. A delay rate of 1 means all trains were delayed.